<?php
require_once SHMS_CORE_PATH."/shms_db_common.inc";

function shms_core_db_get_person_info_list_from_eid($eid){
  $query = db_select(SHMS_EVENT_ATTENDANCE,'pye');
  $query->innerJoin(SHMS_PERSON_BY_YEAR_TABLE,"py","pye.pyid = py.id");
  $query->innerJoin(SHMS_PERSON_TABLE,'p',"py.pid = p.id");
  $query->condition('pye.eid',$eid);
  $query->fields('p');
  $query->addField('py',"id","pyid");
  $query->addField('pye',"id","pyeid");
  $query->addField('py',"room_number");
  return $query->execute()->fetchAllAssoc("pyid",PDO::FETCH_ASSOC);
}
